﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Entity
{
    public class Unit
    {
        #region Fields
        private int unitId;       
        private string name;        
        private bool visible;       
        #endregion

        #region Properties
        public int UnitId
        {
            get { return unitId; }
            set { unitId = value; }
        }

        public string Name
        {
            get { return name; }
            set { name = value; }
        }

        public bool Visible
        {
            get { return visible; }
            set { visible = value; }
        }

        public override string ToString()
        {
            return this.name;
        }

        public override bool Equals(object obj)
        {
            return (obj == null || obj == DBNull.Value) ? false : ((Unit) obj).UnitId == this.unitId;
        }
        #endregion

    }
}
